package riofrio;

import java.util.IdentityHashMap;

/**
 * Calculates a value for a node.
 * 
 * @author Victor Hugo Herrera Maldonado
 */
@FunctionalInterface
public interface Evaluator<T, V> {
    
    /**
     * Calculates a value.
     * 
     * @param node Node to calculate its value
     * @param results Already calculated values for other nodes in the same walk
     * @return The value of the node.
     */
    V getValue(TreeNode<T> node, IdentityHashMap<TreeNode<T>, V> results);
    
}
